//
//  LGNumberKeyBoard.m
//  ALS3.0
//
//  Created by guomianxiang on 2017/4/18.
//  Copyright © 2017年 guomianxiang. All rights reserved.
//

#import "LGNumberKeyBoard.h"

@interface LGNumberKeyBoard ()

@end

@implementation LGNumberKeyBoard

- (void)awakeFromNib {
    [super awakeFromNib];
    self.view.backgroundColor = [UIColor clearColor];
}

- (IBAction)keyBoardClick:(UIButton *)sender {
    LGNumberKeyBoardActionType actionType;
    NSInteger number = -1;
    
    if (sender.tag == 3451) {
        actionType = LGNumberKeyBoardActionForget;
    }
    else if (sender.tag == 3452) {
        actionType = LGNumberKeyBoardActionCancel;
    }
    else {
        actionType = LGNumberKeyBoardActionNumber;
        number = [sender.titleLabel.text integerValue];
    }
    
    if ([self.delegate respondsToSelector:@selector(numberKeyBoardCommitActionType:andNumber:)]) {
        [self.delegate numberKeyBoardCommitActionType:actionType andNumber:number];
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
